const path = require("path")
const rootPath = path.dirname(__dirname) //执行一次dirname将目录定位到docs目录
const utils = require('./utils/utils.js');
const filehelper = require('./utils/init-page.js');

module.exports = {
    base:"/simple-docs/",
    repo: "https://gitee.com/cloud-simple/simple-docs.git",
    repoLabel: '文档仓库',
    title: 'Simple框架文档',
    head: [
        // ['link', {rel: 'icon', href: '/assets/img/logo.svg'}]
    ],
    themeConfig: {
        sidebarDepth: 3,
        // logo: '/assets/img/logo.svg',
        nav: [
            {text: '首页', link: '/'},
            {text: '使用指南', link: '/use-guide/'},
            {text: '开发文档', link: '/dev-guide/'}
        ],
        sidebar: {
            '/use-guide/': utils.genSidebar('使用指南', filehelper.getFileName(rootPath + "/use-guide"), false),
            '/dev-guide/': utils.genSidebar('开发指南', filehelper.getFileName(rootPath + "/dev-guide"), false)
        },
        lastUpdated: '最新更新时间'
    },
    plugins: ['@vuepress/back-to-top'],
    markdown: {
        lineNumbers: true,
        plugins: [
            ['markdown-it-plantuml', {
                // 提供你的选项
            }], ['markvis', {
                // 提供你的选项
            }], ['markdown-it-math', {
                // 提供你的选项
            }]
        ]
    }
}
